package com.sport;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

public class Home extends Activity {
	final int JOGGING = 0, CYCLING = 1;
	
	/** Called when the activity is first created. */
	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.main);
		Button jog = (Button) findViewById(R.id.jogging);
		jog.setOnClickListener(new View.OnClickListener() {
			public void onClick(View view) {
				Intent myIntent = new Intent(view.getContext(), Sport.class);
				myIntent.putExtra("sport", JOGGING);
				startActivityForResult(myIntent, 0);
			}

		});
		Button cyc = (Button) findViewById(R.id.cycling);
		cyc.setOnClickListener(new View.OnClickListener() {
			public void onClick(View view) {
				Intent myIntent = new Intent(view.getContext(), Sport.class);
				myIntent.putExtra("sport", CYCLING);
				startActivityForResult(myIntent, 0);
			}
		});
		Button res = (Button) findViewById(R.id.results);
		res.setOnClickListener(new View.OnClickListener() {
			public void onClick(View view) {
				Intent myIntent = new Intent(view.getContext(), Results.class);
				startActivityForResult(myIntent, 0);
			}
		});
	}
}